home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-08-10 | 27.7 KB | 603 lines | [TEXT/MPS ] |
- (*
- File: AppleEvents.mod
-
- Contains: AppleEvent Package Interfaces.
-
- Version: Technology: System 7.5
- Package: Universal Interfaces 2.0 in “MPW Latest” on ETO #17
-
- Copyright: © 1984-1995 by Apple Computer, Inc.
- All rights reserved.
-
- Bugs?: If you find a problem with this file, use the Apple Bug Reporter
- stack. Include the file and version information (from above)
- in the problem description and send to:
- Internet: apple.bugs.applelink.apple.com
- AppleLink: APPLE.BUGS
-
- *)
-
- (*$TAGS-*)
- (*$CALLING PASCAL*)
- MODULE AppleEvents;
-
- IMPORT SYSTEM, Types, Memory, Quickdraw, Events, EPPC, Notification;
-
- (* $PUSH*)
- (* $ALIGN MAC68K*)
- (* $LibExport+*)
-
- CONST
- (* Apple event descriptor types *)
- typeBoolean* = LONG("bool");
- typeChar* = LONG("TEXT");
- typeSMInt* = LONG("shor");
- typeInteger* = LONG("long");
- typeSMFloat* = LONG("sing");
- typeFloat* = LONG("doub");
- typeLongInteger* = LONG("long");
- typeShortInteger* = LONG("shor");
- typeLongFloat* = LONG("doub");
- typeShortFloat* = LONG("sing");
- typeExtended* = LONG("exte");
- typeComp* = LONG("comp");
- typeMagnitude* = LONG("magn");
- typeAEList* = LONG("list");
- typeAERecord* = LONG("reco");
- typeAppleEvent* = LONG("aevt");
- typeTrue* = LONG("true");
- typeFalse* = LONG("fals");
- typeAlias* = LONG("alis");
- typeEnumerated* = LONG("enum");
- typeType* = LONG("type");
- typeAppParameters* = LONG("appa");
- typeProperty* = LONG("prop");
- typeFSS* = LONG("fss ");
- typeKeyword* = LONG("keyw");
- typeSectionH* = LONG("sect");
- typeWildCard* = LONG("****");
- typeApplSignature* = LONG("sign");
- typeQDRectangle* = LONG("qdrt");
- typeFixed* = LONG("fixd");
- typeSessionID* = LONG("ssid");
- typeTargetID* = LONG("targ");
- typeProcessSerialNumber* = LONG("psn ");
- typeNull* = LONG("null"); (* null or nonexistent data *)
- (* Keywords for Apple event parameters *)
- keyDirectObject* = LONG("----");
- keyErrorNumber* = LONG("errn");
- keyErrorString* = LONG("errs");
- keyProcessSerialNumber* = LONG("psn ");
- (* Keywords for Apple event attributes *)
- keyTransactionIDAttr* = LONG("tran");
- keyReturnIDAttr* = LONG("rtid");
- keyEventClassAttr* = LONG("evcl");
- keyEventIDAttr* = LONG("evid");
- keyAddressAttr* = LONG("addr");
- keyOptionalKeywordAttr* = LONG("optk");
- keyTimeoutAttr* = LONG("timo");
- keyInteractLevelAttr* = LONG("inte"); (* this attribute is read only - will be set in AESend *)
- keyEventSourceAttr* = LONG("esrc"); (* this attribute is read only *)
- keyMissedKeywordAttr* = LONG("miss"); (* this attribute is read only *)
- keyOriginalAddressAttr* = LONG("from"); (* new in 1.0.1 *)
- (* Keywords for special handlers *)
- keyPreDispatch* = LONG("phac"); (* preHandler accessor call *)
- keySelectProc* = LONG("selh"); (* more selector call *)
- (* Keyword for recording *)
- keyAERecorderCount* = LONG("recr"); (* available only in vers 1.0.1 and greater *)
- (* Keyword for version information *)
- keyAEVersion* = LONG("vers"); (* available only in vers 1.0.1 and greater *)
- (* Event Class *)
- kCoreEventClass* = LONG("aevt");
- (* Event AIFF.ID’s *)
- kAEOpenApplication* = LONG("oapp");
- kAEOpenDocuments* = LONG("odoc");
- kAEPrintDocuments* = LONG("pdoc");
- kAEQuitApplication* = LONG("quit");
- kAEAnswer* = LONG("ansr");
- kAEApplicationDied* = LONG("obit");
-
- (* Constants for use in AESend mode *)
- kAENoReply* = $00000001; (* sender doesn't want a reply to event *)
- kAEQueueReply* = $00000002; (* sender wants a reply but won't wait *)
- kAEWaitReply* = $00000003; (* sender wants a reply and will wait *)
- kAENeverInteract* = $00000010; (* server should not interact with user *)
- kAECanInteract* = $00000020; (* server may try to interact with user *)
- kAEAlwaysInteract* = $00000030; (* server should always interact with user where appropriate *)
- kAECanSwitchLayer* = $00000040; (* interaction may switch layer *)
- kAEDontReconnect* = $00000080; (* don't reconnect if there is a sessClosedErr from PPCToolbox *)
- kAEWantReceipt* = EPPC.nReturnReceipt; (* sender wants a receipt of message *)
- kAEDontRecord* = $00001000; (* don't record this event - available only in vers 1.0.1 and greater *)
- kAEDontExecute* = $00002000; (* don't send the event for recording - available only in vers 1.0.1 and greater *)
- (* Constants for the send priority in AESend *)
- kAENormalPriority* = $00000000; (* post message at the end of the event queue *)
- kAEHighPriority* = EPPC.nAttnMsg; (* post message at the front of the event queue *)
-
- (* Constants for recording *)
- kAEStartRecording* = LONG("reca"); (* available only in vers 1.0.1 and greater *)
- kAEStopRecording* = LONG("recc"); (* available only in vers 1.0.1 and greater *)
- kAENotifyStartRecording* = LONG("rec1"); (* available only in vers 1.0.1 and greater *)
- kAENotifyStopRecording* = LONG("rec0"); (* available only in vers 1.0.1 and greater *)
- kAENotifyRecording* = LONG("recr");
-
- (* Constant for the returnID param of AECreateAppleEvent *)
- kAutoGenerateReturnID* = -1; (* AECreateAppleEvent will generate a session-unique AIFF.ID *)
- (* Constant for transaction AIFF.ID’s *)
- kAnyTransactionID* = 0; (* no transaction is in use *)
- (* Constants for timeout durations *)
- kAEDefaultTimeout* = -1; (* timeout value determined by AEM *)
- kNoTimeOut* = -2; (* wait until reply comes back, however long it takes *)
-
- (* Constants for AEResumeTheCurrentEvent *)
- kAENoDispatch* = 0; (* dispatch parameter to AEResumeTheCurrentEvent takes a pointer to a dispatch *)
- kAEUseStandardDispatch* = $FFFFFFFF; (* table, or one of these two constants *)
- (* Constants for Refcon in AEResumeTheCurrentEvent with kAEUseStandardDispatch *)
- kAEDoNotIgnoreHandler* = $00000000;
- kAEIgnoreAppPhacHandler* = $00000001; (* available only in vers 1.0.1 and greater *)
- kAEIgnoreAppEventHandler* = $00000002; (* available only in vers 1.0.1 and greater *)
- kAEIgnoreSysPhacHandler* = $00000004; (* available only in vers 1.0.1 and greater *)
- kAEIgnoreSysEventHandler* = $00000008; (* available only in vers 1.0.1 and greater *)
- kAEIngoreBuiltInEventHandler* = $00000010; (* available only in vers 1.0.1 and greater *)
- kAEDontDisposeOnResume* = $80000000; (* available only in vers 1.0.1 and greater *)
-
- (* Apple event manager data types *)
-
- TYPE
- AEEventClass* = Types.FourCharCode;
-
- AEEventID* = Types.FourCharCode;
-
- AEKeyword* = Types.FourCharCode;
-
- DescType* = Types.ResType;
-
- AEDesc* = RECORD
- descriptorType*: DescType;
- dataHandle*: Types.Handle;
- END;
-
- AEKeyDesc* = RECORD
- descKey*: AEKeyword;
- descContent*: AEDesc;
- END;
-
- (* an AEDesc which contains address data *)
- AEAddressDesc* = AEDesc;
-
- (* a list of AEDesc's is a special kind of AEDesc *)
- AEDescList* = AEDesc;
-
- (* AERecord is a list of keyworded AEDesc's *)
- AERecord* = AEDescList;
-
- (* an AERecord that contains an AppleEvent *)
- AppleEvent* = AERecord;
-
- (* parameter to AESend *)
- AESendMode* = LONGINT;
-
- (* priority param of AESend *)
- AESendPriority* = INTEGER;
-
-
- CONST
- kAEInteractWithSelf* = 0;
- kAEInteractWithLocal* = 1;
- kAEInteractWithAll* = 2;
-
-
- TYPE
- AEInteractAllowed* = Types.SInt8;
-
-
- CONST
- kAEUnknownSource* = 0;
- kAEDirectCall* = 1;
- kAESameProcess* = 2;
- kAELocalProcess* = 3;
- kAERemoteProcess* = 4;
-
-
- TYPE
- AEEventSource* = Types.SInt8;
-
-
- CONST
- kAEDataArray* = 0;
- kAEPackedArray* = 1;
- kAEHandleArray* = 2;
- kAEDescArray* = 3;
- kAEKeyDescArray* = 4;
-
-
- TYPE
- AEArrayType* = Types.SInt8;
-
- AEArrayData* = RECORD
- (*ΔΔ CASE INTEGER OF
- 0: (
- kAEDataArray*: ARRAY [0..0] OF INTEGER;
- );
- 1: (
- kAEPackedArray*: PACKED ARRAY [0..0] OF CHAR;
- );
- 2: (
- kAEHandleArray*: ARRAY [0..0] OF Types.Handle;
- );
- 3: (
- kAEDescArray*: ARRAY [0..0] OF AEDesc;
- );
- 4: (
- kAEKeyDescArray*: ARRAY [0..0] OF AEKeyDesc;
- );*)
- END;
-
- AEArrayDataPointer* = POINTER TO AEArrayData;
-
- AEIdleProcPtr* = (*ΔΔ Types.ProcPtr;*) PROCEDURE (VAR theEvent: Events.EventRecord; VAR sleepTime: LONGINT; VAR mouseRgn: Quickdraw.RgnHandle): BOOLEAN;
- AEFilterProcPtr* = (*ΔΔ Types.ProcPtr;*) PROCEDURE (VAR theEvent: Events.EventRecord; returnID: LONGINT; transactionID: LONGINT; (*CONST*)VAR sender: AEAddressDesc): BOOLEAN;
- AEEventHandlerProcPtr* = (*ΔΔ Types.ProcPtr;*) PROCEDURE ((*CONST*)VAR theAppleEvent: AppleEvent; VAR reply: AppleEvent; handlerRefcon: LONGINT): Types.OSErr;
- AECoerceDescProcPtr* = (*ΔΔ Types.ProcPtr;*) PROCEDURE ((*CONST*)VAR fromDesc: AEDesc; toType: DescType; handlerRefcon: LONGINT; VAR toDesc: AEDesc): Types.OSErr;
- AECoercePtrProcPtr* = (*ΔΔ Types.ProcPtr;*) PROCEDURE (typeCode: DescType; dataPtr: (*ΔΔUNIVΔΔ*) Types.Ptr; dataSize: Memory.Size; toType: DescType; handlerRefcon: LONGINT; VAR result: AEDesc): Types.OSErr;
- AEIdleUPP* = Types.UniversalProcPtr;
- AEFilterUPP* = Types.UniversalProcPtr;
- AEEventHandlerUPP* = Types.UniversalProcPtr;
- AECoerceDescUPP* = Types.UniversalProcPtr;
- AECoercePtrUPP* = Types.UniversalProcPtr;
-
- CONST
- uppAEIdleProcInfo* = $00000FD0; (* PROCEDURE (4 byte param, 4 byte param, 4 byte param): 1 byte result; *)
- uppAEFilterProcInfo* = $00003FD0; (* PROCEDURE (4 byte param, 4 byte param, 4 byte param, 4 byte param): 1 byte result; *)
- uppAEEventHandlerProcInfo* = $00000FE0; (* PROCEDURE (4 byte param, 4 byte param, 4 byte param): 2 byte result; *)
- uppAECoerceDescProcInfo* = $00003FE0; (* PROCEDURE (4 byte param, 4 byte param, 4 byte param, 4 byte param): 2 byte result; *)
- uppAECoercePtrProcInfo* = $0003FFE0; (* PROCEDURE (4 byte param, 4 byte param, 4 byte param, 4 byte param, 4 byte param, 4 byte param): 2 byte result; *)
-
- PROCEDURE NewAEIdleProc*(userRoutine: AEIdleProcPtr): AEIdleUPP;
- (*$IF NOT GENERATINGCFM *)
- INLINE PASCAL $2E9F;
- (*$END*)
-
- PROCEDURE NewAEFilterProc*(userRoutine: AEFilterProcPtr): AEFilterUPP;
- (*$IF NOT GENERATINGCFM *)
- INLINE PASCAL $2E9F;
- (*$END*)
-
- PROCEDURE NewAEEventHandlerProc*(userRoutine: AEEventHandlerProcPtr): AEEventHandlerUPP;
- (*$IF NOT GENERATINGCFM *)
- INLINE PASCAL $2E9F;
- (*$END*)
-
- PROCEDURE NewAECoerceDescProc*(userRoutine: AECoerceDescProcPtr): AECoerceDescUPP;
- (*$IF NOT GENERATINGCFM *)
- INLINE PASCAL $2E9F;
- (*$END*)
-
- PROCEDURE NewAECoercePtrProc*(userRoutine: AECoercePtrProcPtr): AECoercePtrUPP;
- (*$IF NOT GENERATINGCFM *)
- INLINE PASCAL $2E9F;
- (*$END*)
-
- PROCEDURE CallAEIdleProc*(VAR theEvent: Events.EventRecord; VAR sleepTime: LONGINT; VAR mouseRgn: Quickdraw.RgnHandle; userRoutine: AEIdleUPP): BOOLEAN;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $205F, $4E90;
- (*$END*)
-
- PROCEDURE CallAEFilterProc*(VAR theEvent: Events.EventRecord; returnID: LONGINT; transactionID: LONGINT; (*CONST*)VAR sender: AEAddressDesc; userRoutine: AEFilterUPP): BOOLEAN;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $205F, $4E90;
- (*$END*)
-
- PROCEDURE CallAEEventHandlerProc*((*CONST*)VAR theAppleEvent: AppleEvent; VAR reply: AppleEvent; handlerRefcon: LONGINT; userRoutine: AEEventHandlerUPP): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $205F, $4E90;
- (*$END*)
-
- PROCEDURE CallAECoerceDescProc*((*CONST*)VAR fromDesc: AEDesc; toType: DescType; handlerRefcon: LONGINT; VAR toDesc: AEDesc; userRoutine: AECoerceDescUPP): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $205F, $4E90;
- (*$END*)
-
- PROCEDURE CallAECoercePtrProc*(typeCode: DescType; dataPtr: (*ΔΔUNIVΔΔ*) Types.Ptr; dataSize: Memory.Size; toType: DescType; handlerRefcon: LONGINT; VAR result: AEDesc; userRoutine: AECoercePtrUPP): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $205F, $4E90;
- (*$END*)
-
- TYPE
- AECoercionHandlerUPP* = Types.UniversalProcPtr;
-
- (**************************************************************************
- The following calls apply to any AEDesc. Every 'result' descriptor is
- created for you, so you will be responsible for memory management
- (including disposing) of the descriptors so created. Note: purgeable
- descriptor data is not supported - the AEM does not call LoadResource.
- **************************************************************************)
-
- PROCEDURE AECreateDesc*(typeCode: DescType; dataPtr: (*ΔΔUNIVΔΔ*) Types.Ptr; dataSize: Memory.Size; VAR result: AEDesc): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0825, $A816;
- (*$END*)
- PROCEDURE AECoercePtr*(typeCode: DescType; dataPtr: (*ΔΔUNIVΔΔ*) Types.Ptr; dataSize: Memory.Size; toType: DescType; VAR result: AEDesc): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0A02, $A816;
- (*$END*)
- PROCEDURE AECoerceDesc*((*CONST*)VAR theAEDesc: AEDesc; toType: DescType; VAR result: AEDesc): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0603, $A816;
- (*$END*)
- PROCEDURE AEDisposeDesc*(VAR theAEDesc: AEDesc): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0204, $A816;
- (*$END*)
- PROCEDURE AEDuplicateDesc*((*CONST*)VAR theAEDesc: AEDesc; VAR result: AEDesc): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0405, $A816;
- (*$END*)
- (**************************************************************************
- The following calls apply to AEDescList. Since AEDescList is a subtype of
- AEDesc, the calls in the previous section can also be used for AEDescList.
- All list and array indices are 1-based. If the data was greater than
- maximumSize in the routines below, then actualSize will be greater than
- maximumSize, but only maximumSize bytes will actually be retrieved.
- **************************************************************************)
- PROCEDURE AECreateList*(factoringPtr: (*ΔΔUNIVΔΔ*) Types.Ptr; factoredSize: Memory.Size; isRecord: BOOLEAN; VAR resultList: AEDescList): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0706, $A816;
- (*$END*)
- PROCEDURE AECountItems*((*CONST*)VAR theAEDescList: AEDescList; VAR theCount: LONGINT): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0407, $A816;
- (*$END*)
- PROCEDURE AEPutPtr*(VAR theAEDescList: AEDescList; index: LONGINT; typeCode: DescType; dataPtr: (*ΔΔUNIVΔΔ*) Types.Ptr; dataSize: Memory.Size): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0A08, $A816;
- (*$END*)
- PROCEDURE AEPutDesc*(VAR theAEDescList: AEDescList; index: LONGINT; (*CONST*)VAR theAEDesc: AEDesc): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0609, $A816;
- (*$END*)
- PROCEDURE AEGetNthPtr*((*CONST*)VAR theAEDescList: AEDescList; index: LONGINT; desiredType: DescType; VAR theAEKeyword: AEKeyword; VAR typeCode: DescType; dataPtr: (*ΔΔUNIVΔΔ*) Types.Ptr; maximumSize: Memory.Size; VAR actualSize: Memory.Size): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $100A, $A816;
- (*$END*)
- PROCEDURE AEGetNthDesc*((*CONST*)VAR theAEDescList: AEDescList; index: LONGINT; desiredType: DescType; VAR theAEKeyword: AEKeyword; VAR result: AEDesc): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0A0B, $A816;
- (*$END*)
- PROCEDURE AESizeOfNthItem*((*CONST*)VAR theAEDescList: AEDescList; index: LONGINT; VAR typeCode: DescType; VAR dataSize: Memory.Size): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $082A, $A816;
- (*$END*)
- PROCEDURE AEGetArray*((*CONST*)VAR theAEDescList: AEDescList; arrayType: Types.ByteParameter; arrayPtr: AEArrayDataPointer; maximumSize: Memory.Size; VAR itemType: DescType; VAR itemSize: Memory.Size; VAR itemCount: LONGINT): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0D0C, $A816;
- (*$END*)
- PROCEDURE AEPutArray*(VAR theAEDescList: AEDescList; arrayType: Types.ByteParameter; (*CONST*)VAR arrayPtr: AEArrayData; itemType: DescType; itemSize: Memory.Size; itemCount: LONGINT): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0B0D, $A816;
- (*$END*)
- PROCEDURE AEDeleteItem*(VAR theAEDescList: AEDescList; index: LONGINT): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $040E, $A816;
- (*$END*)
- (**************************************************************************
- The following calls apply to AERecord. Since AERecord is a subtype of
- AEDescList, the calls in the previous sections can also be used for
- AERecord an AERecord can be created by using AECreateList with isRecord
- set to true.
- **************************************************************************)
- PROCEDURE AEPutKeyPtr*(VAR theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; typeCode: DescType; dataPtr: (*ΔΔUNIVΔΔ*) Types.Ptr; dataSize: Memory.Size): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0A0F, $A816;
- (*$END*)
- PROCEDURE AEPutKeyDesc*(VAR theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; (*CONST*)VAR theAEDesc: AEDesc): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0610, $A816;
- (*$END*)
- PROCEDURE AEGetKeyPtr*((*CONST*)VAR theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; desiredType: DescType; VAR typeCode: DescType; dataPtr: (*ΔΔUNIVΔΔ*) Types.Ptr; maximumSize: Memory.Size; VAR actualSize: Memory.Size): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0E11, $A816;
- (*$END*)
- PROCEDURE AEGetKeyDesc*((*CONST*)VAR theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; desiredType: DescType; VAR result: AEDesc): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0812, $A816;
- (*$END*)
- PROCEDURE AESizeOfKeyDesc*((*CONST*)VAR theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; VAR typeCode: DescType; VAR dataSize: Memory.Size): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0829, $A816;
- (*$END*)
- PROCEDURE AEDeleteKeyDesc*(VAR theAppleEvent: AppleEvent; theAEKeyword: AEKeyword): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0413, $A816;
- (*$END*)
- PROCEDURE AEPutParamPtr*(VAR theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; typeCode: DescType; dataPtr: (*ΔΔUNIVΔΔ*) Types.Ptr; dataSize: Memory.Size): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0A0F, $A816;
- (*$END*)
- PROCEDURE AEPutParamDesc*(VAR theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; (*CONST*)VAR theAEDesc: AEDesc): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0610, $A816;
- (*$END*)
- PROCEDURE AEGetParamPtr*((*CONST*)VAR theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; desiredType: DescType; VAR typeCode: DescType; dataPtr: (*ΔΔUNIVΔΔ*) Types.Ptr; maximumSize: Memory.Size; VAR actualSize: Memory.Size): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0E11, $A816;
- (*$END*)
- PROCEDURE AEGetParamDesc*((*CONST*)VAR theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; desiredType: DescType; VAR result: AEDesc): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0812, $A816;
- (*$END*)
- PROCEDURE AESizeOfParam*((*CONST*)VAR theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; VAR typeCode: DescType; VAR dataSize: Memory.Size): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0829, $A816;
- (*$END*)
- PROCEDURE AEDeleteParam*(VAR theAppleEvent: AppleEvent; theAEKeyword: AEKeyword): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0413, $A816;
- (*$END*)
- (**************************************************************************
- The following calls also apply to type AppleEvent. Message attributes are
- far more restricted, and can only be accessed through the following 5
- calls. The various list and record routines cannot be used to access the
- attributes of an event.
- **************************************************************************)
- PROCEDURE AEGetAttributePtr*((*CONST*)VAR theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; desiredType: DescType; VAR typeCode: DescType; dataPtr: (*ΔΔUNIVΔΔ*) Types.Ptr; maximumSize: Memory.Size; VAR actualSize: Memory.Size): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0E15, $A816;
- (*$END*)
- PROCEDURE AEGetAttributeDesc*((*CONST*)VAR theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; desiredType: DescType; VAR result: AEDesc): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0826, $A816;
- (*$END*)
- PROCEDURE AESizeOfAttribute*((*CONST*)VAR theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; VAR typeCode: DescType; VAR dataSize: Memory.Size): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0828, $A816;
- (*$END*)
- PROCEDURE AEPutAttributePtr*(VAR theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; typeCode: DescType; dataPtr: (*ΔΔUNIVΔΔ*) Types.Ptr; dataSize: Memory.Size): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0A16, $A816;
- (*$END*)
- PROCEDURE AEPutAttributeDesc*(VAR theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; (*CONST*)VAR theAEDesc: AEDesc): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0627, $A816;
- (*$END*)
- (**************************************************************************
- The next couple of calls are basic routines used to create, send,
- and process
- **************************************************************************)
- PROCEDURE AECreateAppleEvent*(theAEEventClass: AEEventClass; theAEEventID: AEEventID; (*CONST*)VAR target: AEAddressDesc; returnID: INTEGER; transactionID: LONGINT; VAR result: AppleEvent): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0B14, $A816;
- (*$END*)
- PROCEDURE AESend*((*CONST*)VAR theAppleEvent: AppleEvent; VAR reply: AppleEvent; sendMode: AESendMode; sendPriority: AESendPriority; timeOutInTicks: LONGINT; idleProc: AEIdleUPP; filterProc: AEFilterUPP): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0D17, $A816;
- (*$END*)
- PROCEDURE AEProcessAppleEvent*((*CONST*)VAR theEventRecord: Events.EventRecord): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $021B, $A816;
- (*$END*)
- (*
- Note: during event processing, an event handler may realize that it is likely
- to exceed the client's timeout limit. Passing the reply to this
- routine causes a wait event to be generated that asks the client
- for more time.
- *)
- PROCEDURE AEResetTimer*((*CONST*)VAR reply: AppleEvent): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0219, $A816;
- (*$END*)
- (**************************************************************************
- The following four calls are available for applications which need more
- sophisticated control over when and how events are processed. Applications
- which implement multi-session servers or which implement their own
- internal event queueing will probably be the major clients of these
- routines. They can be called from within a handler to prevent the AEM from
- disposing of the AppleEvent when the handler returns. They can be used to
- asynchronously process the event (as MacApp does).
- **************************************************************************)
- PROCEDURE AESuspendTheCurrentEvent*((*CONST*)VAR theAppleEvent: AppleEvent): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $022B, $A816;
- (*$END*)
- (*
- Note: The following routine tells the AppleEvent manager that processing
- is either about to resume or has been completed on a previously suspended
- event. The procPtr passed in as the dispatcher parameter will be called to
- attempt to redispatch the event. Several constants for the dispatcher
- parameter allow special behavior. They are:
- - kAEUseStandardDispatch means redispatch as if the event was just
- received, using the standard AppleEvent dispatch mechanism.
- - kAENoDispatch means ignore the parameter.
- Use this in the case where the event has been handled and no
- redispatch is needed.
- - non nil means call the routine which the dispatcher points to.
- *)
- PROCEDURE AEResumeTheCurrentEvent*((*CONST*)VAR theAppleEvent: AppleEvent; (*CONST*)VAR reply: AppleEvent; dispatcher: AEEventHandlerUPP; handlerRefcon: LONGINT): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0818, $A816;
- (*$END*)
- PROCEDURE AEGetTheCurrentEvent*(VAR theAppleEvent: AppleEvent): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $021A, $A816;
- (*$END*)
- PROCEDURE AESetTheCurrentEvent*((*CONST*)VAR theAppleEvent: AppleEvent): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $022C, $A816;
- (*$END*)
- (**************************************************************************
- The following three calls are used to allow applications to behave
- courteously when a user interaction such as a dialog box is needed.
- **************************************************************************)
- PROCEDURE AEGetInteractionAllowed*(VAR level: AEInteractAllowed): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $021D, $A816;
- (*$END*)
- PROCEDURE AESetInteractionAllowed*(level: Types.ByteParameter): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $011E, $A816;
- (*$END*)
- PROCEDURE AEInteractWithUser*(timeOutInTicks: LONGINT; nmReqPtr: Notification.NMRecPtr; idleProc: AEIdleUPP): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $061C, $A816;
- (*$END*)
- (**************************************************************************
- These calls are used to set up and modify the event dispatch table.
- **************************************************************************)
- PROCEDURE AEInstallEventHandler*(theAEEventClass: AEEventClass; theAEEventID: AEEventID; handler: AEEventHandlerUPP; handlerRefcon: LONGINT; isSysHandler: BOOLEAN): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $091F, $A816;
- (*$END*)
- PROCEDURE AERemoveEventHandler*(theAEEventClass: AEEventClass; theAEEventID: AEEventID; handler: AEEventHandlerUPP; isSysHandler: BOOLEAN): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0720, $A816;
- (*$END*)
- PROCEDURE AEGetEventHandler*(theAEEventClass: AEEventClass; theAEEventID: AEEventID; VAR handler: AEEventHandlerUPP; VAR handlerRefcon: LONGINT; isSysHandler: BOOLEAN): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0921, $A816;
- (*$END*)
- (**************************************************************************
- These calls are used to set up and modify the coercion dispatch table.
- **************************************************************************)
- PROCEDURE AEInstallCoercionHandler*(fromType: DescType; toType: DescType; handler: AECoercionHandlerUPP; handlerRefcon: LONGINT; fromTypeIsDesc: BOOLEAN; isSysHandler: BOOLEAN): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0A22, $A816;
- (*$END*)
- PROCEDURE AERemoveCoercionHandler*(fromType: DescType; toType: DescType; handler: AECoercionHandlerUPP; isSysHandler: BOOLEAN): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0723, $A816;
- (*$END*)
- PROCEDURE AEGetCoercionHandler*(fromType: DescType; toType: DescType; VAR handler: AECoercionHandlerUPP; VAR handlerRefcon: LONGINT; VAR fromTypeIsDesc: BOOLEAN; isSysHandler: BOOLEAN): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0B24, $A816;
- (*$END*)
- (**************************************************************************
- These calls are used to set up and modify special hooks into the
- AppleEvent manager.
- **************************************************************************)
- PROCEDURE AEInstallSpecialHandler*(functionClass: AEKeyword; handler: Types.UniversalProcPtr; isSysHandler: BOOLEAN): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0500, $A816;
- (*$END*)
- PROCEDURE AERemoveSpecialHandler*(functionClass: AEKeyword; handler: Types.UniversalProcPtr; isSysHandler: BOOLEAN): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0501, $A816;
- (*$END*)
- PROCEDURE AEGetSpecialHandler*(functionClass: AEKeyword; VAR handler: Types.UniversalProcPtr; isSysHandler: BOOLEAN): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $052D, $A816;
- (*$END*)
- (**************************************************************************
- This call was added in version 1.0.1. If called with the keyword
- keyAERecorderCount (LONG("recr")), the number of recorders that are
- currently active is returned in 'result'.
- **************************************************************************)
- (* available only in vers 1.0.1 and greater *)
- PROCEDURE AEManagerInfo*(keyWord: AEKeyword; VAR result: LONGINT): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $303C, $0441, $A816;
- (*$END*)
-
- (* $ALIGN RESET*)
- (* $POP*)
-
- END AppleEvents.
-